<?php
class YH
{
	static public $db = '';
	static public $tpl = '';
	static public $lang = '';
	
	public function run()
	{
		Database::init();
		Language::init();
		Template::init();
	}
	
	static public function db()
	{
		return Database::getDbh();
	}
	
	static public function tpl($modName)
	{
		return Template::render($modName);
	}
	
	static public function layoutTpl($modName)
	{
		return Template::layout($modName);
	}
	
	static public function lang($modName)
	{
		return Language::load($modName);
	}
	
	static public function _($langString)
	{
		return Language::_($langString);
	}
	
	static public function model($modName)
	{
		return Model::load($modName);
	}
	
	static public function getTplName()
	{
		return Template::getModName();
	}
	
	static public function getLangName()
	{
		return Language::getModName();
	}
	
	static public function getTplData($name)
	{
		return Template::getData($name);
	}
	
	static public function setTplData($name, $value)
	{
		return Template::setData($name, $value);
	}
}
?>